<%@page pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:forEach items="${permissionRoot.children}" var="permission">
    <c:if test="${empty permission.children}">
        <li>
            <a class="J_menuItem" href="${APP_PATH}${permission.url}"><i class="fa ${permission.icon}"></i> <span
                    class="nav-label"> ${permission.name}</span></a>
        </li>
    </c:if>
    <c:if test="${not empty permission.children}">
        <li>
            <a href="#">
                <i class="fa ${permission.icon}"></i>
                <span class="nav-label"> ${permission.name}</span>
                <span class="fa arrow"></span>
            </a>
            <ul class="nav nav-second-level">
                <c:forEach items="${permission.children}" var="child">
                    <li>
                        <a class="J_menuItem" href="${APP_PATH}${child.url}"><i class="${child.icon}"></i>${child.name}
                        </a>
                    </li>
                </c:forEach>
            </ul>
        </li>
    </c:if>
</c:forEach>

